package com.tbit.manager.api;

import com.tbit.manager.enums.ApiConstants;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * 人工结束订单使用卡券
 * @author <a href="mailto:liu.haoxiang@tbit.com.cn">BUGXiang</a>
 * @version 1.0
 * @since 2025-4-1
 */
@FeignClient(name = ApiConstants.NAME)
public interface UserCardApi {

    String PREFIX = ApiConstants.PREFIX + "/userCard";


    /**
     * 获取用户有效卡券卡券
     * @param userId    用户id
     * @param accountId 区域id
     * @return  Map<String, Object>
     */
    @GetMapping(value = PREFIX + "/getEfficientCard", produces = "application/json", consumes = "application/json")
    Map<String, Object> getEfficientCard(@RequestParam("userId") Integer userId, @RequestParam("accountId") Integer accountId);


    /**
     * 消费卡券
     * @param userId        用户id
     * @param accountId     区域id
     * @param rideCardId    骑行卡id
     * @param vipId         会员卡id
     * @param couponId      优惠券id
     * @return Map<String, Object>
     */
    @GetMapping(value = PREFIX + "/consumptionCardCoupon", produces = "application/json", consumes = "application/json")
    Map<String, Object> consumptionCardCoupon(@RequestParam("userId") Integer userId, @RequestParam("accountId") Integer accountId, @RequestParam(name = "rideCardId", required = false) Integer rideCardId, @RequestParam(name = "vipId", required = false) Integer vipId, @RequestParam(name = "couponId", required = false) Integer couponId);
}
